package com.yangyanzhao.numberexercise.controller;

import cn.hutool.core.lang.Console;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.http.HttpUtil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author sunziwen
 * @version 1.0
 * @date 2018-11-29 16:55
 **/
@Controller
public class RandomNumberController {
    @RequestMapping("/")
    public String randomNumber(Model model) {
        model.addAttribute("number", RandomUtil.randomInt(0,100));
        return "index";
    }
   public static void main(String args[]) {
       /*String s = HttpUtil.get("http://www.zzsky.cn/code/mrmy/mrmy.asp");
       Console.log("["+s+"]");
       [document.write("<script src='http://www.zzsky.cn/code/mrmy/mrmy/689.asp' charset='gb2312'></script>");]
       [document.write("<script src='http://www.zzsky.cn/code/mrmy/mrmy/140.asp' charset='gb2312'></script>");]*/
   }
}
